#include "QtUI/PackageUndoableCommands.qth"
#include "QtUI/PackageUndoableCommands.moh"
#include "QtUI/QtUndoableCommand.hpp"
#include "Ctrl/AddNewPackageCtrlCmd.hpp"
#include "Ctrl/AddNewRootRequirementCtrlCmd.hpp"

namespace QtUI
{

QtUndoableCommand* PackageUndoableCommands::createAddNewPackageCommand( 
	Ctrl::ControlCenter& ctrlCenter, Model::Package* pParentPackage, Model::Package* pNewPackage)
{
	return new QtUndoableCommand( 
		tr( "Add new package"), 
		new Ctrl::AddNewPackageCtrlCmd( ctrlCenter, pParentPackage, pNewPackage));
}

// ---------------------------------------------------------------------------------------------------------------------

QtUndoableCommand* PackageUndoableCommands::createAddNewRootRequirementCommand(
	Ctrl::ControlCenter& ctrlCenter, Model::Package* pParentPackage, Model::Requirement* pNewRequirement)
{
	return new QtUndoableCommand( 
		tr( "Add requirement group"),
		new Ctrl::AddNewRootRequirementCtrlCmd( ctrlCenter, pParentPackage, pNewRequirement));
}

} // namespace QtUI
